﻿using DB.Domain;
using DB.EFData;
using System;

namespace DB.Application
{
	class Program
	{
		static void Main(string[] args)
		{
			using (Context DBContext = new Context()) { 
				Member member = new Member()
				{
					Name = "AddUser",
					CreateTime = DateTime.Now
				};
				DBContext.Members.Add(member);

				try
				{
					var count = DBContext.SaveChanges();
					Console.WriteLine(count);
				}
				catch
				{
					Console.WriteLine("数据写入失败");
				}
			}
			Console.WriteLine("Hello World!");
		}
	}
}
